﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Game.Foundation.ChineseChess
{
    public interface IChessman
    { }

    public abstract class ChessmanBase : IChessman
    {
        public string DisplayText { get; private set; }

        protected Chessboard _board;

        public Camp Camp { get; set; }

        public int XLocation { get; set; }

        public int YLocation { get; set; }

        public object Tag { get; set; }

        public ChessmanBase(Chessboard board, Camp camp, string text)
        {
            this._board = board;
            this.Camp = camp;
            this.DisplayText = text;
        }

        public void SetLocation(int x, int y)
        {
            this.XLocation = x;
            this.YLocation = y;
        }

        public virtual bool CanMoveTo(int xLocation, int yLocation)
        {
            return false;
        }
    }
}
